import Vue from 'vue'
import App from './App.vue'

//导入实例&使用路由
import router from './router'
import store from './store'

Vue.config.productionTip = false

//引入重置样式
import './assets/css/index.scss'

//引入淘宝适配方案
import 'lib-flexible'

// 注册全局过滤器
import * as filters from '@/filters'
//循环注册全局过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

import {
  Button,
  Form,
  Field,
  Tab,
  Tabs,
  Tag,
  Rate,
  Icon,
  Divider,
  Sidebar,
  SidebarItem,
  Card,
} from 'vant'

Vue.use(Form)
  .use(Field)
  .use(Button)
  .use(Tab)
  .use(Tabs)
  .use(Tag)
  .use(Rate)
  .use(Icon)
  .use(Divider)
  .use(Sidebar)
  .use(SidebarItem)
  .use(Card)

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
